package com.wn.order.service;

import com.github.pagehelper.PageInfo;
import com.wn.common.entity.MyParam;
import com.wn.common.entity.MyRsp;
import com.wn.common.pojo.Orders;
import com.wn.common.pojo.Percentage;
import com.wn.order.common.DataGridResponse;
import com.wn.order.vo.*;
import org.apache.ibatis.annotations.Param;

import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.util.List;

/**
 * @BelongsProject: shared_parking
 * @BelongsPackage: com.wn.order.service
 * @Author: 段彪
 * @CreateTime: 2020-06-11 12:14
 * @Description: 表现层接口
 */
public interface OrderService {

    //查询所有订单详情
    List<Orders> getAll();

    //添加订单所有信息
    MyRsp addOrders(GenerateOrdersVo orders);

    //逻辑删除订单
    MyRsp deleteOrdersById(String oId);

    //Tenant Property Lessor查询订单详情
    List<PropertyLessorVo> getTPLAll();


    //根据订单id模糊查询
    List<ViewEarnings> fuzzQueryById(String username);

    //分页查询
    PageInfo<Orders> pagingQuery(MyParam<Orders> myParam);

    //订单查询
    List<PropertyLessorVo> queryOrder();

    //平台方订单分页查询
    DataGridResponse getAllOrder(Integer page, Integer rows,String username);

    //出租方订单分页查询
    DataGridResponse getLessonOrder(Integer page, Integer rows,String username,String token);

    //物业方订单分页查询
    DataGridResponse getPropertyOrder(Integer page, Integer rows,String username,String token);


    //普通结算
    BigDecimal SettlementMoney(Integer hour);

    //查看收益
    DataGridResponse ViewEarnings(Integer page, Integer rows,String realName);

    //查询提成
    DataGridResponse getAllPercentage(Integer page,Integer rows,String name);

    //根据oid来条件修改一个提成对象
    MyRsp updatePercentage(String tcId,String commission);

    //车位信息
    MyRsp getCarportVo(String cpId);

    //支付宝当面付
    MyRsp Pay(String oid);

    //支付宝回调
    String aliPayCallback(HttpServletRequest request);

    //支付宝查询订单
    MyRsp queryAliPayOrderStatus(MyParam<Orders> myParam);

    //车位我的订单
    MyRsp myOrders(MyParam<MyOrderVo> myParam);

    //根据用户查询
//    MyParam<MyOrderVo> myOrderName(MyParam<MyOrderVo> myParam);
    //物业方收益提成
    DataGridResponse PropertyCommission(Integer page, Integer rows,String username,String token);

    //出租方收益提成
    DataGridResponse LessorCommission(Integer page, Integer rows,String username,String token);

}
